package com.ggggeeennn.studentUser.controller.exam;

import com.ggggeeennn.common.core.controller.BaseController;
import com.ggggeeennn.common.core.page.TableDataInfo;
import com.ggggeeennn.exam.domain.ExamManage;
import com.ggggeeennn.question.domain.Question;
import com.ggggeeennn.studentUser.domain.DO.ExerciseQuery;
import com.ggggeeennn.studentUser.service.ExerciseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/student/exercise")
public class ExerciseController extends BaseController {

    //获取练习题
    @Autowired
    private ExerciseService exerciseService;
    @GetMapping("/list")
    //需要参数判断题数量，填空题数量，选择题数量，难度，章节，课程
    public TableDataInfo getExerciseList(ExerciseQuery exerciseQuery){
        List<Question> list = exerciseService.getExerciseList(exerciseQuery);
        return getDataTable(list);
    }


}
